home *** CD-ROM | disk | FTP | other *** search
/ Aminet 8 / Aminet 8 (1995)(GTI - Schatztruhe)[!][Oct 1995].iso / Aminet / dev / gcc / gcc270_src.lha / gcc-2.7.0-amiga / config / i386 / sol2.h < prev    next >
C/C++ Source or Header  |  1995-06-15  |  3KB  |  92 lines

  1. /* Target definitions for GNU compiler for Intel 80386 running Solaris 2
  2.    Copyright (C) 1993 Free Software Foundation, Inc.
  3.  
  4.    Written by Fred Fish (fnf@cygnus.com).
  5.  
  6. This file is part of GNU CC.
  7.  
  8. GNU CC is free software; you can redistribute it and/or modify
  9. it under the terms of the GNU General Public License as published by
  10. the Free Software Foundation; either version 2, or (at your option)
  11. any later version.
  12.  
  13. GNU CC is distributed in the hope that it will be useful,
  14. but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. GNU General Public License for more details.
  17.  
  18. You should have received a copy of the GNU General Public License
  19. along with GNU CC; see the file COPYING.  If not, write to
  20. the Free Software Foundation, 59 Temple Place - Suite 330,
  21. Boston, MA 02111-1307, USA.  */
  22.  
  23. #include "i386/sysv4.h"
  24.  
  25. /* The Solaris 2.0 x86 linker botches alignment of code sections.
  26.    It tries to align to a 16 byte boundary by padding with 0x00000090
  27.    ints, rather than 0x90 bytes (nop).  This generates trash in the
  28.    ".init" section since the contribution from crtbegin.o is only 7
  29.    bytes.  The linker pads it to 16 bytes with a single 0x90 byte, and
  30.    two 0x00000090 ints, which generates a segmentation violation when
  31.    executed.  This macro forces the assembler to do the padding, since
  32.    it knows what it is doing. */
  33.  
  34. #define FORCE_INIT_SECTION_ALIGN do { asm (ALIGN_ASM_OP ## " 16"); } while (0)
  35. #define FORCE_FINI_SECTION_ALIGN FORCE_INIT_SECTION_ALIGN
  36.  
  37. /* Add "sun" to the list of symbols defined for SVR4.  */
  38. #undef CPP_PREDEFINES
  39. #define CPP_PREDEFINES \
  40.   "-Di386 -Dunix -D__svr4__ -Dsun \
  41.    -Asystem(unix) -Asystem(svr4) -Acpu(i386) -Amachine(i386)"
  42.  
  43. #undef CPP_SPEC
  44. #define CPP_SPEC "\
  45.    %{compat-bsd:-iwithprefixbefore ucbinclude -I/usr/ucbinclude}"
  46.  
  47. #undef LIB_SPEC
  48. #define LIB_SPEC \
  49.   "%{compat-bsd:-lucb -lsocket -lnsl -lelf -laio} %{!shared:%{!symbolic:-lc}}"
  50.  
  51. #undef  ENDFILE_SPEC
  52. #define ENDFILE_SPEC "crtend.o%s %{pg:crtn.o%s}%{!pg:crtn.o%s}"
  53.  
  54. /* This should be the same as in svr4.h, except with -R added.  */
  55. #undef LINK_SPEC
  56. #define LINK_SPEC \
  57.   "%{h*} %{V} %{v:%{!V:-V}} \
  58.    %{b} %{Wl,*:%*} \
  59.    %{static:-dn -Bstatic} \
  60.    %{shared:-G -dy -z text} \
  61.    %{symbolic:-Bsymbolic -G -dy -z text} \
  62.    %{G:-G} \
  63.    %{YP,*} \
  64.    %{R*} \
  65.    %{compat-bsd: \
  66.      %{!YP,*:%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
  67.        %{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
  68.      -R /usr/ucblib} \
  69.    %{!compat-bsd: \
  70.      %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
  71.        %{!p:-Y P,/usr/ccs/lib:/usr/lib}}} \
  72.    %{Qy:} %{!Qn:-Qy}"
  73.  
  74. /* This defines which switch letters take arguments.
  75.    It is as in svr4.h but with -R added.  */
  76.  
  77. #undef SWITCH_TAKES_ARG
  78. #define SWITCH_TAKES_ARG(CHAR) \
  79.   (   (CHAR) == 'D' \
  80.    || (CHAR) == 'U' \
  81.    || (CHAR) == 'o' \
  82.    || (CHAR) == 'e' \
  83.    || (CHAR) == 'u' \
  84.    || (CHAR) == 'I' \
  85.    || (CHAR) == 'm' \
  86.    || (CHAR) == 'L' \
  87.    || (CHAR) == 'R' \
  88.    || (CHAR) == 'A' \
  89.    || (CHAR) == 'h' \
  90.    || (CHAR) == 'z')
  91.  
  92.